@font-face {
    font-family: material-icon;
    src: url(../../../src/material-icons.woff2);
}

:root {
    --accent-bg-color: #ea1;
    --accent-color: #fa1;
}

html,
body,
#app {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

body {
    overflow-x: hidden;
}

.material-icon {
    font-family: "material-icon";
}

todo-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: .25em 0;
    box-sizing: border-box;
}

todo-item {
    display: flex;
    width: 100%;
    align-items: center;
    height: 2em;
    gap: .5em;
    padding: 0 .5em;
    box-sizing: border-box;
    --delete-opacity: 0;
    --delete-width: 0em;
    flex: 0 0 auto;
    position: absolute;
}

todo-item:hover {
    --delete-opacity: 1;
    --delete-width: 1em;
}

todo-item input[type=checkbox] {
    display: inline-block;
    appearance: none;
    width: 1.5em;
    height: 1.5em;
    line-height: 1.5em;
    border-radius: .75em;
    background-color: #fff;
    border: solid 1px #aaa;
    margin: 0;
    flex: 1 0 auto;
    transition: .2s ease-in-out;
    text-align: center;
}

todo-item input[type=checkbox]:checked {
    background-color: var(--accent-bg-color);
    border: solid 1px #ccc;
}

todo-item input[type=checkbox]:checked::before {
    content: "done";
    font-family: "material-icon";
    font-size: 1em;
    color: #fff;
    font-weight: bold;
}

todo-item .viewer,
todo-item input[type=text] {
    display: inline-block;
    height: 1.5em;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border: none;
    background-color: transparent;
    outline: none;
    font-size: .9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

todo-item .viewer a {
    color: var(--accent-bg-color);
}

todo-item .delete {
    color: rgba(0 0 0 / .5);
    opacity: var(--delete-opacity);
    width: 1em;
    cursor: pointer;
    transition: .2s ease-in-out;
    -webkit-user-select: none;
    user-select: none;
    text-indent: calc(1em - var(--delete-width));
    margin-left: calc(-1.5em + var(--delete-width));
}

todo-item .delete:hover {
    color: rgba(0 0 0 / .75);
}

todo-item input[type=checkbox]:checked~.viewer {
    text-decoration: line-through;
    color: rgba(0 0 0 / .6);
}

todo-list>.new-item {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 36px;
    height: 36px;
    font-size: 1.6em;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 4px 4px 12px rgba(0 0 0 / .25);
    transition: .2s ease-in-out;
    cursor: default;
    -webkit-user-select: none;
    user-select: none;
    z-index: 1;
}

todo-list>.new-item:hover {
    box-shadow: 4px 8px 16px rgba(0 0 0 / .3);
}

todo-list .empty-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: .8em;
    -webkit-user-select: none;
    user-select: none;
}

todo-list .empty-list>.material-icon {
    color: rgba(0 0 0 / .4);
    font-size: 4em;
}

todo-list .empty-list>span {
    color: rgba(0 0 0 / .5);
    font-size: .8em;
}